package com.itany.shop.service;

import com.itany.shop.exception.ProductNotExistException;
import com.itany.shop.exception.RequestParameterErrorException;
import com.itany.shop.exception.UserNotExistException;
import com.itany.shop.exception.UserNotLoginException;
import com.itany.shop.vo.Cart;

/**
 * @author MissChen
 * @date 2024年04月01日 11:07
 */
public interface CartService {

    /**
     * 将指定商品添加到购物车中
     * @param cart
     * @param id
     */
    public void addCart(Cart cart,Integer id) throws RequestParameterErrorException, ProductNotExistException, UserNotLoginException;

    /**
     * 删除购物车中指定商品
     * @param cart
     * @param id
     */
    public void removeCart(Cart cart,Integer id) throws  RequestParameterErrorException, UserNotLoginException;

    /**
     * 修改指定商品的明细数量
     * @param cart
     * @param num
     */
    public void modifyCart(Cart cart,Integer id,Integer num) throws  RequestParameterErrorException, UserNotLoginException;

}
